<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Designer extends CI_Controller {
	public function index()
	{	
		$data['tag'] = date('Ymd');
		$data['ser'] = 'http://'.$_SERVER['SERVER_NAME'];
		$data['cart_count'] = 1;
		$data['is_login'] = TRUE;
		$data['logoName'] = 'Super3D';
		$data['targetUrl'] = $data['ser'] . $_SERVER['REQUEST_URI'];
		$data['username'] = 'Stony';
		$data['uid'] = '1000001';
// 		var_export($_REQUEST);
		$this->load->view('designer',$data);
	}
	public function user()
	{
// 		$data['tag'] = date('Ymd');
// 		$data['ser'] = 'http://'.$_SERVER['SERVER_NAME'];
// 		$data['cart_count'] = 1;
// 		$data['is_login'] = TRUE;
// 		$data['logoName'] = 'Super3D';
// 		$data['targetUrl'] = $data['ser'] . $_SERVER['REQUEST_URI'];
// 		$data['username'] = 'Stony';
// 		$data['uid'] = '1000001';
// 		// 		var_export($_REQUEST);
// 		$this->load->view('designer',$data);
		echo $_SERVER['REQUEST_URI'];
		$uri = $_SERVER['REQUEST_URI'];
		echo "<br>";
		$uris = split("/", $uri);
		var_dump($uris);
		echo "<br>";
		echo end($uris);
		echo "<br>";
		if('wishlist' == end($uris)){
			self::wishlist();
		}elseif('favorites' == end($uris)){
			self::favorites();
		}
		echo "<br>";
		var_export($_REQUEST);
		echo "<br>";
		var_export($_SERVER);
	}
	public function wishlist(){
		echo 'this page wishlist';
		echo "<br>";
		echo $_SERVER['REQUEST_URI'];
		echo "<br>";
		var_export($_REQUEST);
	}
	public function favorites(){
		echo 'this page favorites';
		echo "<br>";
		echo $_SERVER['REQUEST_URI'];
		echo "<br>";
		var_export($_REQUEST);
	}
}